4
4
.
.
1
1
.
.
8
8
V
V
i
i
d
d
e
e
o
o
P
P
l
l
a
a
y
y
e
e
r
r
I
I
n
n
f
f
o
o
From XCode 12 SwiftUI supports VideoPlayer for playing Video (which for now doesn't work in simulator).
ContentView.swift
import SwiftUI
import AVKit
struct ContentView: View {
private let player = AVPlayer(url: URL(string: "https://ivoronline.com/BachataBasic.mp4")!)
var body: some View {
VideoPlayer(player: player)
}
}